home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 2 / Gekikoh Dennoh Club Vol. 2 (Japan).7z / Gekikoh Dennoh Club Vol. 2 (Japan) (Track 01).bin / games / mashou / plugin / white.c < prev    next >
Text File  |  1997-05-29  |  756b  |  52 lines

  1. /*
  2.                                 
  3.             パレット白色化
  4.             white.x
  5.     徐々に、パレットが、白色になる。
  6.                                 
  7.                         by SJOM
  8.  
  9.  
  10. */
  11.  
  12. #include <sys/iocs.h>
  13. /*
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. */
  17.  
  18. static void
  19. pal_up(void)
  20. {
  21.     int block,code,col=0,bl=0,red=0,gr=0;
  22.     for (block=2;block<16;block++) {
  23.     _iocs_spalet(0,block,-1);        /* dummy */
  24.         for (code=0;code<16;code++) {
  25.             gr=_iocs_spalet(code+0x80000000,block,-1);
  26.             bl=(gr>>=1) & 31;
  27.             red=(gr>>=5) & 31;
  28.             gr>>=5;
  29.             bl++;
  30.             if (bl==32) bl--;
  31.             gr++;
  32.             if (gr==32) gr--;
  33.             red++;
  34.             if (red==32) red--;
  35.             col=(gr<<11) | (red<<6) | (bl<<1) | 1;
  36.             _iocs_spalet(code+0x80000000,block,col);
  37.         };
  38.     };
  39. }
  40.  
  41.  
  42. void
  43. main(void)
  44. {
  45.     int j;
  46.     for (j=0;j<32;j++) {
  47.         pal_up();
  48.     };
  49. }
  50.  
  51.  
  52.